Calculate the frame rect correctly when resizing toplevels, fixes bug
authorRichard Hult <richard@imendio.com>
Sat, 3 Nov 2007 09:45:25 +0000 (09:45 +0000)
committerRichard Hult <rhult@src.gnome.org>
Sat, 3 Nov 2007 09:45:25 +0000 (09:45 +0000)
2007-11-03  Richard Hult  <richard@imendio.com>

* gdk/quartz/gdkwindow-quartz.c: (move_resize_window_internal):
Calculate the frame rect correctly when resizing toplevels, fixes
bug #492209.

svn path=/trunk/; revision=18963

ChangeLog
gdk/quartz/gdkwindow-quartz.c

index df861b07b930651a93cefd880d816aa4b87375ec..5ff8edf106be8d8152cbbdc25c72f25f41db773f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-11-03  Richard Hult  <richard@imendio.com>
+
+       * gdk/quartz/gdkwindow-quartz.c: (move_resize_window_internal):
+       Calculate the frame rect correctly when resizing toplevels, fixes
+       bug #492209.
+
 2007-11-01  Richard Hult  <richard@imendio.com>
 
        * gdk/quartz/GdkQuartzWindow.c:
index a60e4c8d22bd8f2ad133f911f186d6c2fb07771a..e3e97a9d7c5df3ce3f648bc92eca435ac4818d17 100644 (file)
@@ -1196,13 +1196,14 @@ move_resize_window_internal (GdkWindow *window,
 
   if (impl->toplevel)
     {
-      NSRect content_rect = 
-       NSMakeRect (private->x, 
-                   _gdk_quartz_window_get_inverted_screen_y (private->y),
-                   impl->width, impl->height);
-      NSRect frame_rect = [impl->toplevel frameRectForContentRect:content_rect];
+      NSRect content_rect;
+      NSRect frame_rect;
+
+      content_rect =  NSMakeRect (private->x,
+                                  _gdk_quartz_window_get_inverted_screen_y (private->y + impl->height),
+                                  impl->width, impl->height);
       
-      frame_rect.origin.y -= frame_rect.size.height;
+      frame_rect = [impl->toplevel frameRectForContentRect:content_rect];
       [impl->toplevel setFrame:frame_rect display:YES];
     }
   else